package tech.powerjob.server.remote.transport;

import tech.powerjob.common.PowerSerializable;
import tech.powerjob.common.enums.Protocol;
import tech.powerjob.common.response.AskResponse;

/**
 * Transporter
 *
 * @author tjq
 * @since 2021/2/7
 */
public interface Transporter {
    /** 获取协议 */
    Protocol getProtocol();
    /** 获取IP地址 */
    String getAddress();
    /** 传递数据 */
    void tell(String address, PowerSerializable object);
    /** 应答 */
    AskResponse ask(String address, PowerSerializable object) throws Exception;
}
